<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://xmlns.jcp.org/jsf/html"
                template="/pages/templates/internal.xhtml"
                xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
                xmlns:f="http://xmlns.jcp.org/jsf/core"
                xmlns:p="http://primefaces.org/ui">
    <ui:define name="head">
        <title>Nuevo Grupo</title>
    </ui:define>
    <ui:define name="body">
        <h:form id="formNewGroup">
            <p:messages autoUpdate="true"/>
            <p:panelGrid id="panel" columns="2">
                <f:facet name="header">Nuevo Grupo</f:facet>
                <p:outputLabel for="txtNombre" value="Nombre:" />
                <p:inputText id="txtNombre" value="#{gruposAdminController.nombre}" required="true"/>
            </p:panelGrid>
            <p:commandButton value="Guardar" action="#{gruposAdminController.newGroup()}"
                         process="@form" update="formNewGroup"/>
            <p:commandButton value="Cancelar" immediate="true" ajax="false"
                             action="#{facesContext.externalContext.redirect('/worldCupInformation/pages/groups/groupAdmin.xhtml')}"/>
        </h:form>
    </ui:define>
</ui:composition>